<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich">
	
	<ui:composition>

		<div id="mainHeader">
	    	<div class="logo" />          
	    	<div class="system_n_t">
	    		<h:outputText value="#{msg.lbl_login_ldap_id}"/>
				<h:outputText value="#{user.chineseName} #{user.id}" title="#{user.departmentCode} - #{user.department}" />
	    	</div>
	    </div>

	    <div id="subHeader">
			<div id="returnMainMenu">
				<h:form>
					<ui:repeat value="#{menuBean.topMenuList}" var="menuItem">						
						<h:outputLink value="#{menuItem.applUrl}" onclick="allowRedirect();">
							<h:outputText value="#{menuItem.applDispName}" />
						</h:outputLink>
					</ui:repeat>					
				</h:form>
			</div>
			
			<div id="logout">
				<div id="logoutContext">
					<h:form>
						<h:commandLink action="#{menuBean.logout}" onclick="javascript:return confirmLogout();">
							<h:outputText value="#{msg.button_logout}" />
						</h:commandLink>
					</h:form>
				</div>
			</div>   
			
			<div id="username">
				<h:outputText value="#{msg.lbl_login_ldap_id}"/>
				<h:outputText id="userInfoId" value="#{user.chineseName} #{user.id}" title="#{user.departmentCode} - #{user.department}" />
			</div>	
					
		</div>

		<div id="navigationBar">
			<h:form>
				<a4j:repeat value="#{menuBean.accessPath}" var="menuItem" rowKeyVar="rowIndex">
					<h:outputLink value="#{menuItem.url}" onclick="allowRedirect();" rendered="#{rowIndex == 0}" >
						<h:outputText value="#{menuItem.menuName}" />
					</h:outputLink>
					<h:outputText value=" > " rendered="#{rowIndex >0}" />
					<h:outputText value="#{menuItem.menuName}" rendered="#{rowIndex >0}" class="currentIndex" />
				</a4j:repeat>
			</h:form>
		</div>

	 	<rich:popupPanel id="loadingDialog" header="系統操作中">
			<h:graphicImage value="/protected/img/loading.gif" />
			<h:outputText value="#{msg.lbl_pls_wait}" />
		</rich:popupPanel>

	</ui:composition>

</html>